Skip to content

Conversation

bnbarham
Copy link
Contributor

@bnbarham bnbarham commented Mar 4, 2023

Rather than editing the macro buffer in refactoring, add appropriate padding and braces when creating the macro.

Don't edit the insertion location - we should update this in a later PR as well.

@bnbarham
Copy link
Contributor Author

bnbarham commented Mar 4, 2023

@swift-ci please test

// ATTACHED_EXPAND-NEXT: 24:3-24:3 (@__swiftmacro_9MacroUser1SV13myTypeWrapperfMA0_.swift) "@accessViaStorage "
// ATTACHED_EXPAND-NEXT: source.edit.kind.active:
// ATTACHED_EXPAND-NEXT: 22:11-22:11 (@__swiftmacro_9MacroUser1SV13myTypeWrapperfMm_.swift) "
// ATTACHED_EXPAND-NEXT: 25:1-25:1 (@__swiftmacro_9MacroUser1SV13myTypeWrapperfMm_.swift) "
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DougGregor IMO it's better to match the compiler here (eg. the temporary output) rather than fake it in the refactoring. I'd like to change it when we expand the macro, but I didn't get time to look at the name lookup failure further.

Rather than editing the macro buffer in refactoring, add appropriate
padding and braces when creating the macro.

Don't edit the insertion location - we should update this in a later PR
as well.
@bnbarham bnbarham force-pushed the do-not-change-refactoring branch from 4ba4a6d to 80d2712 Compare March 4, 2023 03:48
@bnbarham
Copy link
Contributor Author

bnbarham commented Mar 4, 2023

@swift-ci please test

@bnbarham bnbarham merged commit edb980e into swiftlang:main Mar 6, 2023
@bnbarham bnbarham deleted the do-not-change-refactoring branch March 6, 2023 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants